<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles"
	prefix="tiles"%>

<rich:panel header="#{messages['booking.label']}">
	<h:panelGrid width="100%" columns="1">
		<h:panelGroup>
			<h:panelGrid width="100%">
				<h:outputText value="#{errorBean.errorMessage}" styleClass="error"></h:outputText>
			</h:panelGrid>
		</h:panelGroup>
		
		<h:panelGroup>
			<h:panelGrid width="100%">
			    <h:outputText value="#{messages['rci.booking.label']}" styleClass="sub_header" />
			</h:panelGrid>
		</h:panelGroup>
		
		<h:panelGroup>
			<h:panelGrid width="100%" align="left">
				<h:commandButton value="#{messages['back']}" action="#{adminRCIBean.initRCIBulkBankAction}" styleClass="button"></h:commandButton>
			</h:panelGrid>
		</h:panelGroup>
		
		<h:panelGroup>
			<h:panelGrid width="100%" columns="1">
			    <h:panelGroup>
					<rich:dataTable id="data" var="rciBooking" value="#{adminRCIBookingBean.rciBookingList}" rows="20" width="99%">
						<rich:column style="text-align:center;width:30%;">
							<f:facet name="header">
								<h:outputText value="#{messages['rci.booking.no.column']}"></h:outputText>
							</f:facet>
						
							<h:outputText value="#{rciBooking.rciBookingNo}"></h:outputText>
						</rich:column>
						
						<rich:column style="text-align:center;width:30%;">
							<f:facet name="header">
								<h:outputText value="#{messages['rci.booking.date.column']}"></h:outputText>
							</f:facet>
							<h:outputText value="#{rciBooking.rciBookingDate}">
								<f:convertDateTime pattern="dd/MM/yyyy" timeZone="Asia/Kuala_Lumpur"/>
							</h:outputText>
						</rich:column>
						
						<rich:column style="text-align:center;width:30%;">
							<f:facet name="header">
								<h:outputText value="#{messages['rci.booking.status.column']}"></h:outputText>
							</f:facet>
						    <h:outputText value="#{rciBooking.status}"></h:outputText>
						</rich:column>	
					</rich:dataTable>
				</h:panelGroup>
				
				<rich:datascroller align="left"  for="data" maxPages="20" />
				
			</h:panelGrid>
		</h:panelGroup>
	</h:panelGrid>
</rich:panel>	